<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>

<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script src="<%=request.getContextPath()%>/resources/js/jquery-1.11.3.min.js" type="text/javascript"></script>
		<script type="text/javascript" src="<%=request.getContextPath()%>/resources/js/jquery-heima-0.0.1.js" ></script>
		<script>
			function add() {
				var cname = document.getElementById("userAction_save_do_logonName").value;
				cname=$.trim(cname);
				if (cname == ""){
					alert("请输入分类名！");
				} else{
					document.getElementById("fomes").submit();
				}
			}

		</script>
	</head>
	<body>
		<form id="fomes" action="<%=request.getContextPath()%>/adminServlet" method="post">
			<input type="hidden" name="method" value="addClassify">
			<table cellSpacing="1" cellPadding="5" width="100%" align="center" bgColor="#eeeeee" style="border: 1px solid #8ba7e3" border="0">
				<tr>
					<td class="ta_01" align="center" bgColor="#afd1f3" colSpan="4" height="26">
						<STRONG>添加分类</STRONG>
					</td>
				</tr>
				<tr>
					<td width="18%" align="center" bgColor="#f5fafe" class="ta_01">
						分类名称：
					</td>
					<td class="ta_01" bgColor="#ffffff" colspan="3">
						<input type="text" name="cname" id="userAction_save_do_logonName" class="bg" />
					</td>
				</tr>

				<tr>
					<td class="ta_01" style="WIDTH: 100%" align="center" bgColor="#f5fafe" colSpan="4">
						<button type="button" id="save" onclick="add()">
							&#30830;&#23450;
						</button>
						<FONT face="宋体">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT>
						<button type="reset" value="重置">&#37326;&#32622;</button>

						<FONT face="宋体">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT>
						<INPUT  type="button" onclick="history.go(-1)" value="返回" />
					</td>
				</tr>
			</table>
		</form>
		<span id="error" hidden>${errors.message}</span>
	</body>
	<script>
	var a = document.getElementById("error").innerText;
	if (a.length>1){
		alert(a);
	}
	</script>
</html>